import Vue from 'vue'
import Router from 'vue-router'
import Home from "./views/home/Home";
import login from "./views/home/login";
import FriendChat from "./views/chat/FriendChat";
import userInfo from "./views/home/userInfo";

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: '/api',
  routes: [
    {
      path: '/',
      name: 'login',
      component: login,
      hidden: true
    },
    {
      path: '/home',
      name : 'home',
      component: Home,
      children:[
        {
          path: '/chat',
          name: '在线聊天',
          component: FriendChat
        },
        {
          path: '/userInfo',
          name: '个人中心',
          component: userInfo
        }
      ]
    }
  ]
})
